<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script >
    $(function () {
        $("#contentTable").treeTable();
    });
</script>
<table id="contentTable" class="table table-bordered mg-t datatable">
  <thead>
  <tr>
    <th>药品名称</th>
    <th>剂量</th>
    <th>频次</th>
    <th>途径</th>
    <th>医生说明</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${orders}" var="orders">
    <tr  id="${orders.id}" style="text-align: center;">
      <td>${orders.orderText}</td>
      <td>${orders.singleDose}</td>
      <td>${orders.performFreq}</td>
      <td>${orders.administration}</td>
      <td>${orders.doctInstruction}</td>
    </tr>
  <c:if test="${orders.children.size()>0}">
    <c:forEach items="${orders.children}" var="child" varStatus="ss">
      <tr id='${ss.count}' pId='${orders.id}' style="text-align: center;">
        <td>${child.orderText}</td>
        <td>${child.singleDose}</td>
        <td>${fns:findFreqDesc(child.performFreq,'')}</td>
        <td>${child.administration}</td>
        <td>${child.doctInstruction}</td>
      </tr>
    </c:forEach>
  </c:if>
  </c:forEach>
  </tbody>
</table>